(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))
Rewrite Strategy: FULL
(1) CpxTrsToCpxRelTrsProof (BOTH BOUNDS(ID, ID) transformation)
Transformed TRS to relative TRS where S is empty.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))
S is empty.
Rewrite Strategy: FULL
(3) InfiniteLowerBoundProof (EQUIVALENT transformation)
The loop following loop proves infinite runtime complexity:
The rewrite sequence
diff(X, Y) →+ if(leq(X, Y), 0, s(diff(p(X), Y)))
gives rise to a decreasing loop by considering the right hand sides subterm at position [2,0].
The pumping substitution is [ ].
The result substitution is [X / p(X)].
(4) BOUNDS(INF, INF)